<template>
  <div>child子组件 - {{ props.count }} - <button @click="fn">btn</button></div>
</template>

<script setup lang="ts">
// vue的常规的props的语法
// const props = defineProps({
//   count: Number,
// });

// const emits = defineEmits(["abc"]);

// ts的泛型语法
const props = defineProps<{
  count: number;
  name?: string;
}>();

const emits = defineEmits<{
  (e: "abc", n: number): void;
}>();

const fn = (): void => {
  emits("abc", 5);
};
</script>
